<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
    <head>
        <title>My account</title>
        <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
        <link type="text/css" rel="stylesheet" href="/stylesheets/menu.css" />
        <link type="text/css" rel="stylesheet" href="/stylesheets/container.css" />
        <link type="text/css" rel="stylesheet" href="/stylesheets/map.css" />
        <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|PT+Sans+Caption:400,700' rel='stylesheet' type='text/css' />
        <script type="text/javascript"
            src="https://maps.googleapis.com/maps/api/js?key=AIzaSyANlSKCcxC-zerJQTLytFPdUfsIkFub6co&sensor=true">
        </script>
        <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(47.21806, -1.55278),
          zoom: 14,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        var map = new google.maps.Map(document.getElementById("map"),
            mapOptions);
      }
      google.maps.event.addDomListener(window, 'load', initialize);
    </script>
    </head>
    <body>
<jsp:include page="/menu.jsp" flush="true" />
        <div class="vcontainer">
            <table>
            <c:forEach var="address" items="${addresses}" >
	            <tr><td><p>${address.address}</p></td>
	                <td><button onclick="location.href='/myalerts/add'">Create an alert</button></td>
	                <td><button onclick="location.href='/myaddresses/delete/${address.address}'">Delete address</button></td>
	            </tr>
            </c:forEach>
            </table>
            <button onclick="location.href='/myaddresses/add'">Add new address</button>
        </div>
<jsp:include page="/vmap.jsp" flush="true" />
    </body>
</html>